Release - 7.2.0 complete review of FlowClient#556
Merged
david-ruiz-cko merged 1 commit intomasterfrom Mar 18, 2026
Merged
Conversation
|
armando-rodriguez-cko
approved these changes
Mar 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



This release introduces significant updates to the Flow payment sessions API, focusing on unifying and simplifying request/response types, improving type safety, and adding extensible configuration entities for payment methods. The changes modernize the Flow client interface, update serialization logic, and introduce new configuration/data classes for payment sessions.
Flow API Modernization and Type Unification:
The
FlowClientandFlowClientImplinterfaces have been refactored to use unified request and response types (PaymentSessionCreateRequest,PaymentSessionSubmitRequest,PaymentSessionCompleteRequest, andPaymentSubmissionResponse) instead of split request/response classes for each operation. This simplifies the API and improves consistency. [1] [2] [3]The method signatures and validation logic in
FlowClientImplhave been updated to match the new types and naming conventions, ensuring clearer parameter validation and more maintainable code.Serialization Enhancements:
The
GsonSerializernow registers a type adapter factory for the newPaymentSubmissionResponsepolymorphic hierarchy, enabling proper deserialization based on payment session status (approved, declined, action required). [1] [2]A new constant
STATUSis added toCheckoutUtilsto support status-based polymorphic deserialization.New Payment Session Entities and Configuration:
ApplePayConfiguration,GooglePayConfiguration, andCardConfigurationprovide extensible configuration options for specific payment methods. [1] [2] [3]Customerand its nestedCustomerSummaryclass encapsulate comprehensive customer information and transaction history for risk assessment.CustomerRetrydefines retry logic for asynchronous payment attempts.PaymentActionmodels instructions for further customer action when required (e.g., redirects, additional data).